package com.spic.business.safetyactivity.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.spic.common.core.annotation.Excel;
import com.spic.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 安全活动记录对象 safety_activity
 *
 * @author spic
 * @date 2022-06-14
 */
public class SafetyActivity extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 活动名称
     */
    @Excel(name = "活动名称")
    @NotBlank(message = "活动名称不能为空")
    private String activityName;

    /**
     * 活动地点
     */
    @Excel(name = "活动地点")
    @NotBlank(message = "活动地点不能为空")
    private String activityPlace;

    /**
     * 活动时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @Excel(name = "活动时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date activityTime;

    /**
     * 主持人
     */
    @Excel(name = "主持人")
    @NotBlank(message = "主持人不能为空")
    private String compere;

    /**
     * 应参加人数
     */
    @Excel(name = "应参加人数")
    @Min(value = 1,message = "应参加人数输入有误")
    private Integer totalNumber;

    /**
     * 出勤人数
     */
    @Excel(name = "出勤人数")
    private Integer attendanceNumber;

    /**
     * 缺席人员及缺席原因
     */
    @Excel(name = "缺席人员及缺席原因")
    private String absenteeismNumber;

    /**
     * 安全学习内容
     */
    @Excel(name = "安全学习内容")
    @NotBlank(message = "安全学习内容不能为空")
    private String safetyLearningContent;

    /**
     * 学习附件
     */
    @Excel(name = "学习附件")
    private String safetyLearningFile;

    /**
     * 领导批示
     */
    @Excel(name = "领导批示")
    private String leaderCommand;

    /**
     * 部门ID(部门权限过滤字段)
     */
    @Excel(name = "部门ID(部门权限过滤字段)")
    private Long deptId;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setActivityName(String activityName) {
        this.activityName = activityName;
    }

    public String getActivityName() {
        return activityName;
    }

    public void setActivityPlace(String activityPlace) {
        this.activityPlace = activityPlace;
    }

    public String getActivityPlace() {
        return activityPlace;
    }

    public void setActivityTime(Date activityTime) {
        this.activityTime = activityTime;
    }

    public Date getActivityTime() {
        return activityTime;
    }

    public void setCompere(String compere) {
        this.compere = compere;
    }

    public String getCompere() {
        return compere;
    }

    public void setTotalNumber(Integer totalNumber) {
        this.totalNumber = totalNumber;
    }

    public Integer getTotalNumber() {
        return totalNumber;
    }

    public void setAttendanceNumber(Integer attendanceNumber) {
        this.attendanceNumber = attendanceNumber;
    }

    public Integer getAttendanceNumber() {
        return attendanceNumber;
    }

    public void setAbsenteeismNumber(String absenteeismNumber) {
        this.absenteeismNumber = absenteeismNumber;
    }

    public String getAbsenteeismNumber() {
        return absenteeismNumber;
    }

    public void setSafetyLearningContent(String safetyLearningContent) {
        this.safetyLearningContent = safetyLearningContent;
    }

    public String getSafetyLearningContent() {
        return safetyLearningContent;
    }

    public void setSafetyLearningFile(String safetyLearningFile) {
        this.safetyLearningFile = safetyLearningFile;
    }

    public String getSafetyLearningFile() {
        return safetyLearningFile;
    }

    public void setLeaderCommand(String leaderCommand) {
        this.leaderCommand = leaderCommand;
    }

    public String getLeaderCommand() {
        return leaderCommand;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public Long getDeptId() {
        return deptId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("activityName", getActivityName())
                .append("activityPlace", getActivityPlace())
                .append("activityTime", getActivityTime())
                .append("compere", getCompere())
                .append("totalNumber", getTotalNumber())
                .append("attendanceNumber", getAttendanceNumber())
                .append("absenteeismNumber", getAbsenteeismNumber())
                .append("safetyLearningContent", getSafetyLearningContent())
                .append("safetyLearningFile", getSafetyLearningFile())
                .append("leaderCommand", getLeaderCommand())
                .append("deptId", getDeptId())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
